home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / SETUP / US / CBUILDER / DATA.Z / MMSYSTEM.INC < prev    next >
Text File  |  1997-02-13  |  60KB  |  1,488 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;
  3. ;         MMSYSTEM.INC - Multimedia assembly language structures & constants
  4. ;
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6.  
  7. ;
  8. ;       C/C++ Run Time Library - Version 8.0
  9. ;       Copyright (c) 1991, 1997 by Borland International
  10. ;       All Rights Reserved.
  11.  
  12. ;     If defined, the following flags inhibit inclusion
  13. ;     of the indicated items:
  14. ;
  15. ;       MMNODRV          - Installable driver support
  16. ;       MMNOSOUND        - Sound support
  17. ;       MMNOWAVE         - Waveform support
  18. ;       MMNOMIDI         - MIDI support
  19. ;       MMNOAUX          - Auxiliary audio support
  20. ;       MMNOTIMER        - Timer support
  21. ;       MMNOJOY          - Joystick support
  22. ;       MMNOMCI          - MCI support
  23. ;       MMNOMMIO         - Multimedia file I/O support
  24. ;
  25.  
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27. ;
  28. ;                   General constants and data types
  29. ;
  30. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  31.  
  32. ; general constants
  33. MAXPNAMELEN        equ    32     ; max product name length (including NULL)
  34. MAXERRORLENGTH     equ    128    ; max error text length (including NULL)
  35.  
  36. ; MMTIME data structure
  37. MMTIME  struc
  38.     mmt_wType           dw    ?  ; indicates the contents of the union
  39.     mmt_TimeUnion       dd    ?  ; union
  40. MMTIME  ends
  41.  
  42. SMPTE struc
  43.     smpte_hour      db    ?  ; hours
  44.     smpte_min       db    ?  ; minutes
  45.     smpte_sec       db    ?  ; seconds
  46.     smpte_frame     db    ?  ; frames
  47.     smpte_fps       db    ?  ; frames per second
  48.     smpte_reserved  db    ?  ; pad
  49. SMPTE ends
  50.  
  51. ; types for wType field in MMTIME struct
  52. TIME_MS         equ    0001h   ; time in milliseconds
  53. TIME_SAMPLES    equ    0002h   ; number of wave samples
  54. TIME_BYTES      equ    0004h   ; current byte offset
  55. TIME_SMPTE      equ    0008h   ; SMPTE time
  56. TIME_MIDI       equ    0010h   ; MIDI time
  57.  
  58.  
  59. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  60. ;
  61. ;                   Multimedia Extensions Window Messages
  62. ;
  63. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  64.  
  65. MM_JOY1MOVE         equ    3A0h            ; joystick
  66. MM_JOY2MOVE         equ    3A1h
  67. MM_JOY1ZMOVE        equ    3A2h
  68. MM_JOY2ZMOVE        equ    3A3h
  69. MM_JOY1BUTTONDOWN   equ    3B5h
  70. MM_JOY2BUTTONDOWN   equ    3B6h
  71. MM_JOY1BUTTONUP     equ    3B7h
  72. MM_JOY2BUTTONUP     equ    3B8h
  73.  
  74. MM_MCINOTIFY        equ    3B9h            ; MCI
  75. MM_MCISYSTEM_STRING equ    3CAh
  76.  
  77. MM_WOM_OPEN         equ    3BBh            ; waveform output
  78. MM_WOM_CLOSE        equ    3BCh
  79. MM_WOM_DONE         equ    3BDh
  80.  
  81. MM_WIM_OPEN         equ    3BEh            ; waveform input
  82. MM_WIM_CLOSE        equ    3BFh
  83. MM_WIM_DATA         equ    3C0h
  84.  
  85. MM_MIM_OPEN         equ    3C1h            ; MIDI input
  86. MM_MIM_CLOSE        equ    3C2h
  87. MM_MIM_DATA         equ    3C3h
  88. MM_MIM_LONGDATA     equ    3C4h
  89. MM_MIM_ERROR        equ    3C5h
  90. MM_MIM_LONGERROR    equ    3C6h
  91.  
  92. MM_MOM_OPEN         equ    3C7h            ; MIDI output
  93. MM_MOM_CLOSE        equ    3C8h
  94. MM_MOM_DONE         equ    3C9h
  95.  
  96.  
  97. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  98. ;
  99. ;               String resource number bases (internal use)
  100. ;
  101. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  102.  
  103. MMSYSERR_BASE          equ    0
  104. WAVERR_BASE            equ    32
  105. MIDIERR_BASE           equ    64
  106. TIMERR_BASE            equ    96
  107. JOYERR_BASE            equ    160
  108. MCIERR_BASE            equ    256
  109.  
  110. MCI_STRING_OFFSET      equ    512
  111. MCI_VD_OFFSET          equ    1024
  112. MCI_CD_OFFSET          equ    1088
  113. MCI_WAVE_OFFSET        equ    1152
  114. MCI_SEQ_OFFSET         equ    1216
  115.  
  116. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  117. ;
  118. ;                       General error return values
  119. ;
  120. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  121.  
  122. ; general error return values
  123. MMSYSERR_NOERROR      equ    0                    ; no error
  124. MMSYSERR_ERROR        equ    (MMSYSERR_BASE + 1)  ; unspecified error
  125. MMSYSERR_BADDEVICEID  equ    (MMSYSERR_BASE + 2)  ; device ID out of range
  126. MMSYSERR_NOTENABLED   equ    (MMSYSERR_BASE + 3)  ; driver failed enable
  127. MMSYSERR_ALLOCATED    equ    (MMSYSERR_BASE + 4)  ; device already allocated
  128. MMSYSERR_INVALHANDLE  equ    (MMSYSERR_BASE + 5)  ; device handle is invalid
  129. MMSYSERR_NODRIVER     equ    (MMSYSERR_BASE + 6)  ; no device driver present
  130. MMSYSERR_NOMEM        equ    (MMSYSERR_BASE + 7)  ; memory allocation error
  131. MMSYSERR_NOTSUPPORTED equ    (MMSYSERR_BASE + 8)  ; function isn't supported
  132. MMSYSERR_BADERRNUM    equ    (MMSYSERR_BASE + 9)  ; error value out of range
  133. MMSYSERR_INVALFLAG    equ    (MMSYSERR_BASE + 10) ; invalid flags passed
  134. MMSYSERR_INVALPARAM   equ    (MMSYSERR_BASE + 11) ; invalid parameter passed
  135. MMSYSERR_LASTERROR    equ    (MMSYSERR_BASE + 11) ; last error in range
  136.  
  137.  
  138. ifndef MMNODRV
  139. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  140. ;
  141. ;                       Installable driver support
  142. ;
  143. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  144.  
  145. DRV_MCI_FIRST          equ    DRV_RESERVED
  146. DRV_MCI_LAST           equ    (DRV_RESERVED + 0FFFh)
  147.  
  148. endif  ;ifndef MMNODRV
  149.  
  150.  
  151. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  152. ;
  153. ;                         Driver callback support
  154. ;
  155. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  156.  
  157. ; flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and
  158. ; midiOutOpen() to specify the type of the dwCallback parameter.
  159. CALLBACK_TYPEMASK   equ    00070000h     ; callback type mask
  160. CALLBACK_NULL       equ    00000000h     ; no callback
  161. CALLBACK_WINDOW     equ    00010000h     ; dwCallback is a HWND
  162. CALLBACK_TASK       equ    00020000h     ; dwCallback is a HTASK
  163. CALLBACK_FUNCTION   equ    00030000h     ; dwCallback is a FARPROC
  164.  
  165. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  166. ;
  167. ;                        Manufacturer and product IDs
  168. ;
  169. ;   Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS,
  170. ;   MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures.
  171. ;
  172. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  173.  
  174. ; manufacturer IDs
  175. MM_MICROSOFT            equ    1       ; Microsoft Corp.
  176.  
  177. ; product IDs
  178. MM_MIDI_MAPPER          equ    1       ; MIDI Mapper
  179. MM_WAVE_MAPPER          equ    2       ; Wave Mapper
  180.  
  181. MM_SNDBLST_MIDIOUT      equ    3       ; Sound Blaster MIDI output port
  182. MM_SNDBLST_MIDIIN       equ    4       ; Sound Blaster MIDI input port
  183. MM_SNDBLST_SYNTH        equ    5       ; Sound Blaster internal synthesizer
  184. MM_SNDBLST_WAVEOUT      equ    6       ; Sound Blaster waveform output
  185. MM_SNDBLST_WAVEIN       equ    7       ; Sound Blaster waveform input
  186.  
  187. MM_ADLIB                equ    9       ; Ad Lib-compatible synthesizer
  188.  
  189. MM_MPU401_MIDIOUT       equ    10      ; MPU401-compatible MIDI output port
  190. MM_MPU401_MIDIIN        equ    11      ; MPU401-compatible MIDI input port
  191.  
  192. MM_PC_JOYSTICK          equ    12      ; Joystick adapter
  193.  
  194.  
  195. ifndef MMNOSOUND
  196. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  197. ;
  198. ;                           Sound support
  199. ;
  200. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  201.  
  202. ; flag values for wFlags parameter
  203. SND_SYNC            equ    0000h   ; play synchronously (default)
  204. SND_ASYNC           equ    0001h   ; play asynchronously
  205. SND_NODEFAULT       equ    0002h   ; don't use default sound
  206. SND_MEMORY          equ    0004h   ; lpszSoundName points to a memory file
  207. SND_LOOP            equ    0008h   ; loop the sound until next sndPlaySound
  208. SND_NOSTOP          equ    0010h   ; don't stop any currently playing sound
  209.  
  210. endif  ;ifndef MMNOSOUND
  211.  
  212.  
  213. ifndef MMNOWAVE
  214. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  215. ;
  216. ;                       W